package com.example.Jd_javaWeb_maven0402.controller;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "CommonServlet", value = "/jump")
public class CommonServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //获取跳转页面路径参数
        String strURL = req.getParameter("pg");
        //服务器进入到目标页面
        req.getRequestDispatcher(strURL).forward(req, resp);
    }
}
